From: Raimond Spekking Date: Thu, 20 Sep 2007 16:33:45 +0000 (+0000) Subject: * Add message 'year-month' to enable swap of year and month in input form of X-Git-Tag: 1.31.0-rc.0~51352 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=00d5fdfe48462599d73404c44d85ceea36e9eb49;p=lhc%2Fweb%2Fwiklou.git * Add message 'year-month' to enable swap of year and month in input form of Special:Contributions for languages which prefer month-year instead of the default year-month --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5a58ca44af..54dc243e70 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -27,6 +27,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 11136) If using Postgres, search path is explicitly set if wgDBmwschema is not set to 'mediawiki', allowing multiple mediawiki instances per user. * (bug 11151) Add descriptive to revision history page +* Add message 'year-month' to enable swap of year and month in input form of + Special:Contributions === Bug fixes in 1.12 === diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index e85ec43bfb..2574a19f91 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -420,8 +420,16 @@ function contributionsForm( $options ) { } $f .= "\t" . Xml::hidden( $name, $value ) . "\n"; } + $inputMonth= '<span style="white-space: nowrap">' . + Xml::label( wfMsg( 'month' ), 'month' ) . ' '. + Xml::monthSelector( $options['month'], -1 ) . ' '. + '</span>'; + $inputYear = '<span style="white-space: nowrap">' . + Xml::label( wfMsg( 'year' ), 'year' ) . ' '. + Xml::input( 'year', 4, $options['year'], array('id' => 'year', 'maxlength' => 4 ) ) . + '</span>'; - $f .= '<fieldset>' . + $f .= Xml::openElement( 'fieldset' ) . Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) . Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parseinline' ) ), 'contribs' , 'newbie' , 'newbie', $options['contribs'] == 'newbie' ? true : false ) . '<br />' . Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parseinline' ) ), 'contribs' , 'user', 'user', $options['contribs'] == 'user' ? true : false ) . ' ' . @@ -431,23 +439,15 @@ function contributionsForm( $options ) { Xml::namespaceSelector( $options['namespace'], '' ) . '</span>' . Xml::openElement( 'p' ) . - '<span style="white-space: nowrap">' . - Xml::label( wfMsg( 'year' ), 'year' ) . ' '. - Xml::input( 'year', 4, $options['year'], array('id' => 'year', 'maxlength' => 4) ) . - '</span>' . - ' '. - '<span style="white-space: nowrap">' . - Xml::label( wfMsg( 'month' ), 'month' ) . ' '. - Xml::monthSelector( $options['month'], -1 ) . ' '. - '</span>' . + wfMsg( 'year-month', $inputYear, $inputMonth ) . ' ' . Xml::submitButton( wfMsg( 'sp-contributions-submit' ) ) . Xml::closeElement( 'p' ); - + $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' ); if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) $f .= "<p>{$explain}</p>"; - - $f .= '</fieldset>' . + + $f .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ); return $f; } diff --git a/languages/messages/MessagesDe.php b/languages/messages/MessagesDe.php index 80b65ac913..ca9266cc8a 100644 --- a/languages/messages/MessagesDe.php +++ b/languages/messages/MessagesDe.php @@ -1569,9 +1569,10 @@ $1', 'nocontribs' => 'Es wurden keine Benutzerbeiträge mit diesen Kriterien gefunden.', 'ucnote' => 'Dies sind die letzten <b>$1</b> Beiträge des Benutzers in den letzten <b>$2</b> Tagen.', 'uclinks' => 'Zeige die letzten $1 Beiträge; zeige die letzten $2 Tage.', -'uctop' => ' (aktuell)', -'month' => 'und Monat:', -'year' => 'bis Jahr:', +'uctop' => '(aktuell)', +'month' => 'Bis Monat:', +'year' => 'und Jahr:', +'year-month' => '$2 $1', 'sp-contributions-newest' => 'Jüngste', 'sp-contributions-oldest' => 'Älteste', diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 7d874bbccc..85b7fed300 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1971,6 +1971,7 @@ Consult the [[Special:Log/delete|deletion log]] for a record of recent deletions 'uctop' => ' (top)', 'month' => 'From month (and earlier):', 'year' => 'From year (and earlier):', +'year-month' => '$1 $2', # $1 year, $2 month; only translate this message to other languages if you have to change it 'sp-contributions-newest' => 'Newest', 'sp-contributions-oldest' => 'Oldest', diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index e3376ca100..87f6be93b7 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -205,6 +205,7 @@ $wgOptionalMessages = array( 'filedelete-backlink', 'pagetitle', 'filename-prefix-blacklist', + 'year-month', ); /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */ diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 2a27f3f5a5..aa9a2a4a48 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1290,6 +1290,7 @@ $wgMessageStructure = array( 'uctop', 'month', 'year', + 'year_month', ), 'sp-contributions' => array( 'sp-contributions-newest', @@ -2396,7 +2397,8 @@ $wgMessageComments = array( 'exif-orientation-6' => '0th row: right; 0th column: top', 'exif-orientation-7' => '0th row: right; 0th column: bottom', 'exif-orientation-8' => '0th row: left; 0th column: bottom', - 'movepage-moved' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.' + 'movepage-moved' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.', + 'year-month' => '$1 year, $2 month', ); /** Messages which contain dollar signs (which are not followed by numbers), and therefore should use a single apostrophe */